home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir36 / makn101a.zip / MAKENAME.DOC < prev    next >
Text File  |  1992-11-24  |  14KB  |  352 lines

  1.  ==============================================================================
  2.  ========================                               =======================
  3.  ========================           MAKENAME            =======================
  4.  ========================                               =======================
  5.  ==============================================================================
  6.  
  7.  
  8.  
  9.  
  10.                       
  11.                          MakeName is Copyright (C) 1992
  12.  
  13.                                       by
  14.  
  15.          Pinnacle Software, CP 386 Mount Royal, Quebec Canada  H3P 3C6
  16.          U.S. Office: Box 714 Airport Road, Swanton, Vermont 05488 USA
  17.  
  18.          Support Line (514) 345-9578  -- Free Files BBS (514) 345-8654
  19.                       
  20.  
  21.          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  22.  
  23.  
  24.          This is a SHAREWARE product.  That means we would like you to
  25.          pass around unregistered copies to other people.  If you have
  26.          a modem,  please upload it to your  favourite  bulletin board
  27.          system,  or give a copy to a friend  who you think might need
  28.          a program like this.   Shareware means sharing!   Pass it on!
  29.     
  30.                       
  31.          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  32.  
  33.  
  34.                       Original concept: James Ludwick
  35.                      Design and coding: Timothy Campbell
  36.                          Documentation: Natasha Mirage
  37.                           Distribution: Kevin Beck
  38.                       Support services: L.Wilson, Z.Krome
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  ==============================================================================
  45.  OVERVIEW
  46.  ==============================================================================
  47.  
  48.  
  49.  MakeName writes a batch file (named SETNAME.BAT) that uses the DOS SET command
  50.  to set a DOS environment variable to  an 8-character string  which  represents
  51.  the current date and time.  This can then be CALLed by a batch file that needs
  52.  such a string for some purpose (usually as part of a file name).
  53.  
  54.  
  55.  
  56.  ==============================================================================
  57.  WHY YOU NEED MAKENAME -- AN EXAMPLE
  58.  ==============================================================================
  59.  
  60.  
  61.  Sometimes you want to  create a batch file that you will run  once in a while,
  62.  which will create  a data file,  but since each file it creates is essentially
  63.  another version of the same data, you want to keep it in the same directory as
  64.  earlier copies.
  65.  
  66.  The usual way is to code the batch file is like this:
  67.  
  68.  
  69.  BATCH FILE "NEWDATA.BAT"                    EXPLANATION
  70.  ------------------------------------------- ----------------------------------
  71.  @ECHO OFF                                   Turn off command echoing
  72.  MAKEDATA                                    Run a program to make the file
  73.  RENAME DATA %1                              Rename the data file
  74.  
  75.  
  76.  You would then call up this batch file as in this example:
  77.  
  78.  NEWDATA FILE0001.DAT
  79.  
  80.  In other words, you are using the variable %1 to represent a unique file name.
  81.  
  82.  The problem with  this approach  is that you have to keep track of the various
  83.  files in the directory.   It would be nice to have a program that would create
  84.  a unique file name based on the date and time.
  85.  
  86.  That's precisely what MAKENAME does!
  87.  
  88.  
  89.  
  90.  ==============================================================================
  91.  INSTALLATION
  92.  ==============================================================================
  93.  
  94.  
  95.  The MakeName program (MAKENAME.EXE) should be placed in your DOS PATH.  For an
  96.  explanation of the DOS PATH command, consult your DOS manual.
  97.  
  98.  
  99.  
  100.  ==============================================================================
  101.  FILES
  102.  ==============================================================================
  103.  
  104.  
  105.  The MakeName package comprises the following files:
  106.  
  107.  ROOTNAME EXT  FILE PURPOSE   DESCRIPTION
  108.  -------- ---  -------------  -------------------------------------------------
  109.  READ     ME   Documentation  Directs your attentions to MAKENAME.DOC
  110.  MAKENAME DOC  Documentation  How to use the MakeName utility (this file)
  111.  VENDOR   DOC  Documentation  Terms for sharing this software with other people
  112.  FILE_ID  DIZ  Documentation  (File used by some BBS's) Brief description
  113.  DESC     SDI  Documentation  (File used by some BBS's) Brief description
  114.  MAKENAME EXE  Program        The MakeName utility
  115.  EXAMPLE1 BAT  Batch file     Sample usage of MakeName
  116.  EXAMPLE2 BAT  Batch file     Sample usage of MakeName
  117.  MN       FRM  Form/Envelope  To register the MakeName utility
  118.  
  119.  
  120.  
  121.  ==============================================================================
  122.  THE FORMAT OF THE VARIABLE
  123.  ==============================================================================
  124.  
  125.  
  126.  The MAKENAME program writes  a short batch file  (named SETNAME.BAT) that uses
  127.  the DOS SET command to set a variable according to the date and time.  You can
  128.  then use this in your batch file, after CALLing it.
  129.  
  130.  The variable is eight characters long.  It uses this format:
  131.  
  132.  Format:    YMDHHMMS
  133.  
  134.  Examples:  1230405K  (Created 1991/02/03, a little after 04:05)
  135.             2NP1631P  (Created 1992/11/23 [November 23 '92] just after 4:31 PM)
  136.  
  137.  Key:       Y ------- Year     The last digit (0 to 9); example: 1993 is 3
  138.             M ------- Month    The month number (1 to 9) or OND (Oct, Nov, Dec)
  139.             D ------- Day      The day of the month (1 to 9, A to W)
  140.             HH ------ Hour     Hour of the day; example: 6 PM is 18
  141.             MM ------ Minute   Minute of the hour
  142.             S ------- Second   Second (0 to 9, A to V)
  143.  
  144.  The  Second  value changes every  two seconds,  rather than every second.  The
  145.  letters used for  Day  and  Second  never  include  I or O,  as these could be
  146.  confused with the digits 1 or 0.
  147.  
  148.  For additional examples, you can run the sample batch file EXAMPLE1.BAT, which
  149.  generates a series of variables.   This batch file is described in the section
  150.  entitled "Sample Batch Files".
  151.  
  152.  
  153.  
  154.  ==============================================================================
  155.  USING THE MAKENAME COMMAND
  156.  ==============================================================================
  157.  
  158.  
  159.  COMMAND FORMAT
  160.  ==============
  161.  
  162.  The format of the MAKENAME command is:
  163.  
  164.  MAKENAME varname [time?]
  165.  
  166.  The "varname" parameter is required (not optional).   The "time?" parameter is
  167.  optional.  If both parameters are omitted,  the program displays a screen that
  168.  summarizes how it is used.
  169.  
  170.  The parameters are as follows:
  171.  
  172.  varname   This is the name of the  DOS enviroment variable  to be  SET  by the
  173.            batch file SETNAME.BAT.
  174.  
  175.  time?     (Optional)  Set this parameters to N if you don't want the time part
  176.            of the variable set.  In such case,  the variable will be only three
  177.            characters long and represent the year, month and day only.
  178.  
  179.  
  180.  
  181.  DUPLICATION
  182.  ===========
  183.  
  184.  Two names created two seconds or less apart will be the same.
  185.  Two names created precisely ten years apart will be the same.
  186.  
  187.  
  188.  
  189.  EXAMPLES
  190.  ========
  191.  
  192.  Here are some examples of the MakeName command:
  193.  
  194.  MAKENAME MYVAR
  195.  
  196.  This would write a batch file named SETNAME.BAT,  which would SET the variable
  197.  named  MYVAR  to a string representing  the date and time.   After CALLing the
  198.  SETNAME batch file, the variable %MYVAR% could be used in other batch files.
  199.  
  200.  MAKENAME MYFILE N
  201.  
  202.  This would write a batch file named SETNAME.BAT,  which would SET the variable
  203.  named MYFILE to a string representing the date only. After CALLing the SETNAME
  204.  batch file, the variable %MYFILE% could be used in other batch files.
  205.  
  206.  
  207.  
  208.  ERRORLEVELS
  209.  ===========
  210.  
  211.  The  success or failure  of the MakeName command  can be tested within a batch
  212.  file by using IF ERRORLEVEL, as follows:
  213.  
  214.  ERRORLEVEL   MEANING
  215.  ----------   -------
  216.       0       MakeName worked successfully
  217.     255       An error occured
  218.  
  219.  
  220.  
  221.  ==============================================================================
  222.  SAMPLE BATCH FILES
  223.  ==============================================================================
  224.  
  225.  
  226.  This section contains two sample batch files.  Copies of these batch files are
  227.  included in the MAKENAME package, as EXAMPLE1.BAT and EXAMPLE2.BAT.
  228.  
  229.  Here is a sample batch file that demonstrates the use of MAKENAME:
  230.  
  231.           
  232.  BATCH FILE "EXAMPLE1.BAT"                   EXPLANATION
  233.  ------------------------------------------- ----------------------------------
  234.  @ECHO OFF                                   Turn off command echoing
  235.  :AGAIN                                      Batch file label
  236.  MAKENAME XYZ                                Make the SETNAME.BAT file
  237.  CALL SETNAME.BAT                            Call it up
  238.  ECHO Variable XYZ is set to %XYZ%           Demonstrate
  239.  ECHO Press Ctrl-C to quit                   Tell user how to escape loop
  240.  PAUSE                                       Wait for a key
  241.  GOTO AGAIN                                  Loop back
  242.  
  243.  
  244.  Here is a sample batch file that backs up your current directory to diskette.
  245.  
  246.  
  247.  BATCH FILE "EXAMPLE2.BAT"                   EXPLANATION
  248.  ------------------------------------------- ----------------------------------
  249.  @ECHO OFF                                   Turn off command echoing
  250.  MAKENAME MYVAR                              Make the SETNAME.BAT file
  251.  CALL SETNAME.BAT                            Call it up
  252.  PKZIP -a %MYVAR%.ZIP *.*                    Save everything in a ZIP file (*)
  253.  COPY %MYVAR%.ZIP A:                         Copy the ZIP file to the diskette
  254.  DEL %MYVAR%.ZIP                             Erase ZIP file
  255.  DIR A:                                      Show what's on A:
  256.  
  257.  
  258.  (*) PKZIP is an excellent  file compression  program  created  by  PKWare Inc.
  259.      (PKWARE, Inc. 7545 N. Port Washington Rd,. Glendale, Wisconsin 53217 USA.)
  260.      An alternative is the  freeware program  LHA,  which is  available  on our
  261.      Support BBS  (514-345-8654,  up to 9600 bps,  downloads permitted on first
  262.      call.)
  263.  
  264.  
  265.  
  266.  ==============================================================================
  267.  WHAT IS SHAREWARE?
  268.  ==============================================================================
  269.  
  270.  
  271.  SHAREWARE  is the growing movement of  "Try Before You Buy" software:   we let
  272.  you try out our program, and if you like it, you purchase a registered copy.
  273.  
  274.  
  275.  By registering,  you make it possible for us to create new versions -- we give
  276.  registered users 2 years of free registrations.   You also make it  economical
  277.  for us to create specialized programs that you need.
  278.  
  279.  
  280.  Shareware keeps our costs low, and that means  lower prices for you.  It works
  281.  because  we trust you,  and we expect you  will  pay for what you use.  (After
  282.  all, the authors do have a legal right to receive payment.)
  283.  
  284.  
  285.  Did you receive shareware from  somebody besides  the author?   In most cases,
  286.  the author did  not  receive  a single penny -- even if you paid for the disk.
  287.  The author is paid ONLY if you register.
  288.  
  289.  
  290.  Please support shareware by passing around unregistered copies of the programs
  291.  you like, and by registering the programs you use!
  292.  
  293.  
  294.  See the text file  MN.FRM  for  registration information.
  295.  
  296.  
  297.  
  298.  ==============================================================================
  299.  SHAREWARE TERMS
  300.  ==============================================================================
  301.  
  302.  
  303.  STANDARD REGISTRATION:  Standard registrations are processed  by mail.   Remit
  304.  the registration by  cheque or money order,  U.S. or Canadian funds,  drawn on
  305.  a U.S. or Canadian bank.  The text file MN.FRM contains an order form.
  306.  
  307.  
  308.  REGISTERING ON COMPUSERVE:  To register on CompuServe, GO SWREG.   Your regis-
  309.  tration number is sent to you via email, usually on the same day you register.
  310.  (Registration of MakeName on CompuServe is available only after Nov. 27, 1992)
  311.  
  312.  
  313.  PURCHASE ORDERS:   We  accept  purchase orders  from  Fortune  500  companies,
  314.  government  offices  (municipal,  state,  provincial,  national),  nationally-
  315.  disseminated  print, radio or television media,  and  major educational insti-
  316.  tutions.
  317.  
  318.  
  319.  CREDIT-CARDS:  The  low price  of  this  program  makes it  impossible  for us
  320.  to process  credit card orders.   If you require fast turn-around,  we suggest
  321.  you use our Instant Registration Service (described below).
  322.  
  323.  
  324.  REGISTRATION PROVISIONS:   Registered  owners  receive  a disk  containing the
  325.  current  latest version  of the program, plus bonus software,  plus 30 minutes
  326.  of dial-in  (voice or modem)  phone support,  plus a 25% discount on upgrades,
  327.  plus a registration number that will allow you to  automatically  register any
  328.  new shareware versions we issue for two years after the date of registration.
  329.  
  330.  
  331.  INSTANT REGISTRATION SERVICE:   When you order using our  Instant Registration
  332.  service,  we will phone you as soon as we receive your order  to give you your
  333.  registration number.   This number can be used to register any  new  shareware
  334.  copy of this program for two years.   Instant Registration  is offered only on
  335.  registrations  paid  by  purchase order  (if qualified)  or  money  order,  or
  336.  certified cheque.  This service is available in North America only.
  337.  
  338.  
  339.  SOURCE CODE:  Source code may be purchased for personal and in-house use only.
  340.  You must be a licensed owner to purchase the source code. Source code may also
  341.  be licensed for use in your own commercial product -- call for full details.
  342.  
  343.  
  344.  PROGRAM CUSTOMIZATION:  We can customize to  your requirements.  Modifications
  345.  are performed at our standard  contract rate of  $35/hr,  but this rate may be
  346.  reduced, based upon the applicability of your modification to other clients.
  347.  
  348.  
  349.  PRODUCT SUPPORT:  Dial-in  support  covers  the  product  itself;  it does not
  350.  cover instruction in DOS or programming.
  351.  
  352.